/*
* $Id: AddChangePointView.h 162 2010-10-04 11:21:18Z volok-aleksej@yandex.ru $
*
* Copyright 2008-2010 by Volokitin Alexey
* All rights reserved
*
*/
#ifndef _ADD_CHANGE_POINT_H_
#define _ADD_CHANGE_POINT_H_

#include "AddChangeView.h"
#include "Components/Journal/FamilyManager.h"

class CAddChangePointView : public CAddChangeView
{
	int m_nUserFields;
protected:
	int m_nIdRecord;
protected:
	virtual std::tstring GetHeaderString() = 0;
protected:
	virtual void Init();
	void GetCurValue();
	void GetSaveData(CFamilyManager::point& pnt,
		std::map<std::tstring, std::tstring>& aUserField);
public:
	CAddChangePointView(CState* pState);
	virtual ~CAddChangePointView();
};

class CAddPointView : public CAddChangePointView
{
protected:
	virtual std::tstring GetHeaderString();
protected:
	DECLARE_MESSAGE_MAP();
	afx_msg void OnSavePoint();
public:
	CAddPointView(CState* pState);
	virtual ~CAddPointView();
public:
	virtual void SetState();
	virtual bool IsViewState(State state);
};

class CChangePointView : public CAddChangePointView
{
protected:
	virtual std::tstring GetHeaderString();
	virtual void InitCurrentValue();
protected:
	DECLARE_MESSAGE_MAP();
	afx_msg void OnSavePoint();
public:
	CChangePointView(CState* pState);
	virtual ~CChangePointView();
public:
	virtual void SetState();
	virtual bool IsViewState(State state);
};

#endif/*_ADD_CHANGE_POINT_H_*/
